<?php use_stylesheet('downloads.css') ?>

<div id="downloads">

  <?php foreach ($categories as $category): ?>
 
    <div class="category_<?php echo Foulek::slugify($category->getName()) ?>">
      <div class="category">
       <div class="feed">
 		 <a href="<?php echo url_for('category', array('sf_subject' => $category, 'sf_format' => 'atom')) ?>">Feed</a>
	   </div>
        <h1>
          <?php echo link_to($category, 'category', $category) ?>
        </h1>
      </div>
 
  <?php include_partial('download/list', array('filys' => $category->getDownload(sfConfig::get('app_max_downloads_on_homepage')))) ?>
      
      <?php if (($count = $category->countDownload() - sfConfig::get('app_max_downloads_on_homepage')) > 0): ?>
        <div class="more_downloads">
          and <?php echo link_to($count, 'category', $category) ?>
          more...
        </div>
      <?php endif; ?>
    </div>
  <?php endforeach; ?>
</div>



